package com.woniuxy.springboottest.bean;

import lombok.Data;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author linke
 * @version 1.0
 * @className: DBPojo
 * @description: 除了使用@ConfigurationProperties自动获取参数以外，还可以在属性上通过@Value得到指定的参数配置
 * @date 2021/11/16 17:31
 */
@Data
@Component
public class DBPojo {
   /* @Value("${datasource.driver-class-name}")
    private String driver;
    @Value("${datasource.url}")
    private String url;
    @Value("${datasource.user}")
    private String user;
    @Value("${datasource.password}")
    private String password;*/
}
